#删除数据

aList = [2,3,45,6,7,8,2,1,3,4]

'''
x = int(input())
n = len(aList)
for i in range(n):
  if aList[i] == x:
    break
for j in range(i,n-1):
  aList[j] = aList[j+1]
aList[n-1] = -1
for x in aList:
  if x != -1:
    print(x)
'''

#删除函数
#pop()
#pop(1)

#remove()
#remove(9)#删除9默认第一个
#

aList=[1,3,5,7,9,2,4,6,8,10]
aList.pop()
for x in aList:
  print(x)

  
aList=[1,3,5,7,9,2,4,6,8,10]
aList.pop(1)
for x in aList:
  print(x)


aList=[1,3,5,7,9,2,4,6,8,10]
aList.remove(9)
for x in aList:
  print(x)

aList=[1,2,2,3,3,3,4,4,5,6]
x=int(input("请输入要删除的整数："))
n=aList.count(x)
if n!=0:
  for i in range(n):
    aList.remove(x)
for x in aList:
  print(x)
